<?php
abstract class tabs
{
	function __construct($labels=array())
	{
		echo ('
		<link rel="stylesheet" type="text/css" href="style/tabs-test.css" />
		<div class="tabs">
		');
		$this->tabs($labels);
		echo ('
		</div>
		');
	}
	function tabs($labels)
	{
		$labelPadding=730/count($labels)/2;
		for($i=0; $i<count($labels); $i++)
		{
			$functName='content'.$i;
			$labelWidth=mb_strlen($labels[$i], 'UTF-8');
			$aLabelPadding=($labelPadding*2-$labelWidth*13)/2;
			($i==0)?$checked="checked":$checked=false;
			echo ('
			<div class="tab">
	       		<input type="radio" id="tab-'.$i.'" name="tab-group-1" '.$checked.'>
	       		<label for="tab-'.$i.'" style="padding: 11px '.$aLabelPadding.'px 11px '.$aLabelPadding.'px;">
                	'.$labels[$i].'
	       		</label>
	       		<div class="content">
	       	');
	       	$this->$functName();
	       	echo ('
	       		</div>
	   		</div>
			');
		}
	}
	abstract function content0();
	abstract function content1();
	abstract function content2();
	abstract function content3();
	abstract function content4();
}
?>